<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">

<head>
    <th:block th:include="include :: header('系统设置')" />
    <th:block th:include="include::bootstrap-select-css" />
</head>

<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <div class="tabs-container">
            <ul class="nav nav-tabs" id="config-title">
                <li class="active"><a data-toggle="tab" href="#admin_common" aria-expanded="false">通用设置</a>
                </li>
                <li><a data-toggle="tab" href="#admin_login" aria-expanded="false">登陆页设置</a>
                </li>
                <li><a data-toggle="tab" href="#admin_index" aria-expanded="false">系统主题设置</a>
                </li>
                <li><a data-toggle="tab" href="#admin_user" aria-expanded="false">用户相关设置</a>
                </li>
            </ul>
            <div class="tab-content">
                <!-- 通用设置 设置-->
                <div id="admin_common" class="tab-pane active">
                    <div class="panel-body">
                        <form class="form-horizontal m" id="form-admin_common">
                            <div class="form-group">
                                <label class="col-sm-3 control-label is-">标题：</label>
                                <div class="col-sm-8">
                                    <input name="sys.common.title"
                                        th:value="${sysConfigs['sys.common.title']}" class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label is-">描述：</label>
                                <div class="col-sm-8">
                                    <input name="sys.common.description"
                                        th:value="${sysConfigs['sys.common.description']}" class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label is-">Logo：</label>
                                <div class="col-sm-8">
                                    <input name="sys.common.logo" th:value="${sysConfigs['sys.common.logo']}"
                                        class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label is-">Ico：</label>
                                <div class="col-sm-8">
                                    <input name="sys.common.ico" th:value="${sysConfigs['sys.common.ico']}"
                                        class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label is-">底部：</label>
                                <div class="col-sm-8">
                                    <textarea name="sys.common.footer"
                                    th:text="${sysConfigs['sys.common.footer']}" class="form-control">
                                    </textarea>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <!-- 登录 设置-->
                <div id="admin_login" class="tab-pane">
                    <div class="panel-body">
                        <form class="form-horizontal m" id="form-admin_login">
                            <div class="form-group">
                                <label class="col-sm-3 control-label is-">背景：</label>
                                <div class="col-sm-8">
                                    <input name="sys.login.back"
                                        th:value="${sysConfigs['sys.login.back']}" class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label is-">介绍：</label>
                                <div class="col-sm-8">
                                    <input name="sys.login.info"
                                        th:value="${sysConfigs['sys。login.info']}" class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label is-">公告开关：</label>
                                <div class="col-sm-8">
                                    <input name="sys.login.msg"
                                        th:value="${sysConfigs['sys.login.msg']}" class="form-control">
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <!-- 管理主题设置 -->
                <div id="admin_index" class="tab-pane">
                    <div class="panel-body">
                        <form class="form-horizontal m" id="form-admin_index">
                            <div class="form-group">
                                <label class="col-sm-3 control-label is-">皮肤样式：</label>
                                <div class="col-sm-8">
                                    <input name="sys.index.skinName"
                                        th:value="${sysConfigs['sys.index.skinName']}" class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label is-">侧边主题：</label>
                                <div class="col-sm-8">
                                    <input name="sys.index.sideTheme"
                                        th:value="${sysConfigs['sys.index.sideTheme']}" class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label is-">导航风格：</label>
                                <div class="col-sm-8">
                                    <input name="sys.index.menuStyle"
                                        th:value="${sysConfigs['sys.index.menuStyle']}" class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label is-">开启页脚：</label>
                                <div class="col-sm-8">
                                    <input name="sys.index.ignoreFooter"
                                        th:value="${sysConfigs['sys.index.ignoreFooter']}" class="form-control">
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <!-- 用户 设置-->
                <div id="admin_user" class="tab-pane">
                    <div class="panel-body">
                        <form class="form-horizontal m" id="form-admin_user">
                            
                        </form>
                    </div>
                </div>
            </div>
            <br>
            <button type="button" class="btn btn-w-m btn-primary center-block" id="submit-btn">修改</button>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include::bootstrap-select-js" />
    <script type="text/javascript">
        var prefix = ctx + "system/config";
        var myForm = "form-admin_common";
        $('#config-title a').click(function (e) {
            e.preventDefault();
            $(this).tab('show');
            myForm = $(this).attr('href').replace("#", "form-");
        });
        function submitHandler() {
            $.operate.save(prefix + "/updateByKey", $('#' + myForm).serialize());

        }
        $("#submit-btn").click(function () {
            submitHandler();
        })
    </script>
</body>

</html>